-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Rebase to v2.50.0-rc2 #5667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rebase to v2.50.0-rc2 #5667
Conversation
For Windows builds >= 15063 set $env:TERM to "xterm-256color" instead of "cygwin" because they have a more capable console system that supports this. Also set $env:COLORTERM="truecolor" if unset. $env:TERM is initialized so that ANSI colors in color.c work, see 29a3963 (Win32: patch Windows environment on startup, 2012-01-15). See git-for-windows#3629 regarding problems caused by always setting $env:TERM="cygwin". This is the same heuristic used by the Cygwin runtime. Signed-off-by: Rafael Kitover <rkitover@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
NtQueryObject under Wine can return a success but fill out no name. In those situations, Wine will set Buffer to NULL, and set result to the sizeof(OBJECT_NAME_INFORMATION). Running a command such as echo "$(git.exe --version 2>/dev/null)" will crash due to a NULL pointer dereference when the code attempts to null terminate the buffer, although, weirdly, removing the subshell or redirecting stdout to a file will not trigger the crash. Code has been added to also check Buffer and Length to ensure the check is as robust as possible due to the current behavior being fragile at best, and could potentially change in the future This code is based on the behavior of NtQueryObject under wine and reactos. Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Atomic append on windows is only supported on local disk files, and it may cause errors in other situations, e.g. network file system. If that is the case, this config option should be used to turn atomic append off. Co-Authored-By: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: 孙卓识 <sunzhuoshi@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
From the documentation of said setting: This boolean will enable fsync() when writing object files. This is a total waste of time and effort on a filesystem that orders data writes properly, but can be useful for filesystems that do not use journalling (traditional UNIX filesystems) or that only journal metadata and not file contents (OS X’s HFS+, or Linux ext3 with "data=writeback"). The most common file system on Windows (NTFS) does not guarantee that order, therefore a sudden loss of power (or any other event causing an unclean shutdown) would cause corrupt files (i.e. files filled with NULs). Therefore we need to change the default. Note that the documentation makes it sound as if this causes really bad performance. In reality, writing loose objects is something that is done only rarely, and only a handful of files at a time. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Whith Windows 2000, Microsoft introduced a flag to the PE header to mark executables as "terminal server aware". Windows terminal servers provide a redirected Windows directory and redirected registry hives when launching legacy applications without this flag set. Since we do not use any INI files in the Windows directory and don't write to the registry, we don't need this additional preparation. Telling the OS that we don't need this should provide slightly improved startup times in terminal server environments. When building for supported Windows Versions with MSVC the /TSAWARE linker flag is automatically set, but MinGW requires us to set the --tsaware flag manually. This partially addresses git-for-windows#3935. Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Add FileVersion, which is a required field As not all required fields were present, none were being included Fixes git-for-windows#4090 Signed-off-by: Kiel Hurley <kielhurley@gmail.com>
In f9b7573 (repository: free fields before overwriting them, 2017-09-05), Git was taught to release memory before overwriting it, but 357a03e (repository.c: move env-related setup code back to environment.c, 2018-03-03) changed the code so that it would not _always_ be overwritten. As a consequence, the `commondir` attribute would point to already-free()d memory. This seems not to cause problems in core Git, but there are add-on patches in Git for Windows where the `commondir` attribute is subsequently used and causing invalid memory accesses e.g. in setups containing old-style submodules (i.e. the ones with a `.git` directory within theirs worktrees) that have `commondir` configured. This fixes git-for-windows#4083. Signed-off-by: Andrey Zabavnikov <zabavnikov@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This compile-time option allows to ask Git to load libcurl dynamically at runtime. Together with a follow-up patch that optionally overrides the file name depending on the `http.sslBackend` setting, this kicks open the door for installing multiple libcurl flavors side by side, and load the one corresponding to the (runtime-)configured SSL/TLS backend. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This implements the Windows-specific support code, because everything is slightly different on Windows, even loading shared libraries. Note: I specifically do _not_ use the code from `compat/win32/lazyload.h` here because that code is optimized for loading individual functions from various system DLLs, while we specifically want to load _many_ functions from _one_ DLL here, and distinctly not a system DLL (we expect libcurl to be located outside `C:\Windows\system32`, something `INIT_PROC_ADDR` refuses to work with). Also, the `curl_easy_getinfo()`/`curl_easy_setopt()` functions are declared as vararg functions, which `lazyload.h` cannot handle. Finally, we are about to optionally override the exact file name that is to be loaded, which is a goal contrary to `lazyload.h`'s design. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The previous commits introduced a compile-time option to load libcurl lazily, but it uses the hard-coded name "libcurl-4.dll" (or equivalent on platforms other than Windows). To allow for installing multiple libcurl flavors side by side, where each supports one specific SSL/TLS backend, let's first look whether `libcurl-<backend>-4.dll` exists, and only use `libcurl-4.dll` as a fall back. That will allow us to ship with a libcurl by default that only supports the Secure Channel backend for the `https://` protocol. This libcurl won't suffer from any dependency problem when upgrading OpenSSL to a new major version (which will change the DLL name, and hence break every program and library that depends on it). This is crucial because Git for Windows relies on libcurl to keep working when building and deploying a new OpenSSL package because that library is used by `git fetch` and `git clone`. Note that this feature is by no means specific to Windows. On Ubuntu, for example, a `git` built using `LAZY_LOAD_LIBCURL` will use `libcurl.so.4` for `http.sslbackend=openssl` and `libcurl-gnutls.so.4` for `http.sslbackend=gnutls`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It is merely a historical wart that, say, `git-commit` exists in the `libexec/git-core/` directory, a tribute to the original idea to let Git be essentially a bunch of Unix shell scripts revolving around very few "plumbing" (AKA low-level) commands. Git has evolved a lot from there. These days, most of Git's functionality is contained within the `git` executable, in the form of "built-in" commands. To accommodate for scripts that use the "dashed" form of Git commands, even today, Git provides hard-links that make the `git` executable available as, say, `git-commit`, just in case that an old script has not been updated to invoke `git commit`. Those hard-links do not come cheap: they take about half a minute for every build of Git on Windows, they are mistaken for taking up huge amounts of space by some Windows Explorer versions that do not understand hard-links, and therefore many a "bug" report had to be addressed. The "dashed form" has been officially deprecated in Git version 1.5.4, which was released on February 2nd, 2008, i.e. a very long time ago. This deprecation was never finalized by skipping these hard-links, but we can start the process now, in Git for Windows. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Since Git v2.39.1, we are a bit more stringent in searching the PATH. In particular, we specifically require the `.exe` suffix. However, the `Repository>Explore Working Copy` command asks for `explorer.exe` to be found on the `PATH`, which _already_ has that suffix. Let's unstartle the PATH-finding logic about this scenario. This fixes git-for-windows#4356 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This will help with Git for Windows' maintenance going forward: It allows Git for Windows to switch its primary libcurl to a variant without the OpenSSL backend, while still loading an alternate when setting `http.sslBackend = openssl`. This is necessary to avoid maintenance headaches with upgrading OpenSSL: its major version name is encoded in the shared library's file name and hence major version updates (temporarily) break libraries that are linked against the OpenSSL library. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In Git for Windows v2.39.0, we fixed a regression where `git.exe` would no longer work in Windows Nano Server (frequently used in Docker containers). This GitHub workflow can be used to verify manually that the Git/Scalar executables work in Nano Server. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When running Git for Windows on a remote APFS filesystem, it would appear that the `mingw_open_append()`/`write()` combination would fail almost exactly like on some CIFS-mounted shares as had been reported in git-for-windows#2753, albeit with a different `errno` value. Let's handle that `errno` value just the same, by suggesting to set `windows.appendAtomically=false`. Signed-off-by: David Lomas <dl3@pale-eds.co.uk> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Windows 10 version 1511 (also known as Anniversary Update), according to https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences introduced native support for ANSI sequence processing. This allows using colors from the entire 24-bit color range. All we need to do is test whether the console's "virtual processing support" can be enabled. If it can, we do not even need to start the `console_thread` to handle ANSI sequences. Or, almost all we need to do: When `console_thread()` does its work, it uses the Unicode-aware `write_console()` function to write to the Win32 Console, which supports Git for Windows' implicit convention that all text that is written is encoded in UTF-8. The same is not necessarily true if native ANSI sequence processing is used, as the output is then subject to the current code page. Let's ensure that the code page is set to `CP_UTF8` as long as Git writes to it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
winuser.h contains the definition of RT_MANIFEST that our LLVM based toolchain needs to understand that we want to embed compat/win32/git.manifest as an application manifest. It currently just embeds it as additional data that Windows doesn't understand. This also helps our GCC based toolchain understand that we only want one copy embedded. It currently embeds one working assembly manifest and one nearly identical, but useless copy as additional data. This also teaches our Visual Studio based buildsystems to pick up the manifest file from git.rc. This means we don't have to explicitly specify it in contrib/buildsystems/Generators/Vcxproj.pm anymore. Slightly counter-intuitively this also means we have to explicitly tell Cmake not to embed a default manifest. This fixes git-for-windows#4707 Signed-off-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
By default, the buffer type of Windows' `stdout` is unbuffered (_IONBF), and there is no need to manually fflush `stdout`. But some programs, such as the Windows Filtering Platform driver provided by the security software, may change the buffer type of `stdout` to full buffering. This nees `fflush(stdout)` to be called manually, otherwise there will be no output to `stdout`. Signed-off-by: MinarKotonoha <chengzhuo5@qq.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The sparse tree walk algorithm was created in d5d2e93 (revision: implement sparse algorithm, 2019-01-16) and involves using the mark_trees_uninteresting_sparse() method. This method takes a repository and an oidset of tree IDs, some of which have the UNINTERESTING flag and some of which do not. Create a method that has an equivalent set of preconditions but uses a "dense" walk (recursively visits all reachable trees, as long as they have not previously been marked UNINTERESTING). This is an important difference from mark_tree_uninteresting(), which short-circuits if the given tree has the UNINTERESTING flag. A use of this method will be added in a later change, with a condition set whether the sparse or dense approach should be used. Signed-off-by: Derrick Stolee <stolee@gmail.com>
This will be helpful in a future change. Signed-off-by: Derrick Stolee <stolee@gmail.com>
In order to more easily compute delta bases among objects that appear at the exact same path, add a --path-walk option to 'git pack-objects'. This option will use the path-walk API instead of the object walk given by the revision machinery. Since objects will be provided in batches representing a common path, those objects can be tested for delta bases immediately instead of waiting for a sort of the full object list by name-hash. This has multiple benefits, including avoiding collisions by name-hash. The objects marked as UNINTERESTING are included in these batches, so we are guaranteeing some locality to find good delta bases. After the individual passes are done on a per-path basis, the default name-hash is used to find other opportunistic delta bases that did not match exactly by the full path name. RFC TODO: It is important to note that this option is inherently incompatible with using a bitmap index. This walk probably also does not work with other advanced features, such as delta islands. Getting ahead of myself, this option compares well with --full-name-hash when the packfile is large enough, but also performs at least as well as the default in all cases that I've seen. RFC TODO: this should probably be recording the batch locations to another list so they could be processed in a second phase using threads. RFC TODO: list some examples of how this outperforms previous pack-objects strategies. (This is coming in later commits that include performance test changes.) Signed-off-by: Derrick Stolee <stolee@gmail.com>
There are many tests that validate whether 'git pack-objects' works as expected. Instead of duplicating these tests, add a new test environment variable, GIT_TEST_PACK_PATH_WALK, that implies --path-walk by default when specified. This was useful in testing the implementation of the --path-walk implementation, especially in conjunction with test such as: - t0411-clone-from-partial.sh : One test fetches from a repo that does not have the boundary objects. This causes the path-based walk to fail. Disable the variable for this test. - t5306-pack-nobase.sh : Similar to t0411, one test fetches from a repo without a boundary object. - t5310-pack-bitmaps.sh : One test compares the case when packing with bitmaps to the case when packing without them. Since we disable the test variable when writing bitmaps, this causes a difference in the object list (the --path-walk option adds an extra object). Specify --no-path-walk in both processes for the comparison. Another test checks for a specific delta base, but when computing dynamically without using bitmaps, the base object it too small to be considered in the delta calculations so no base is used. - t5316-pack-delta-depth.sh : This script cares about certain delta choices and their chain lengths. The --path-walk option changes how these chains are selected, and thus changes the results of this test. - t5322-pack-objects-sparse.sh : This demonstrates the effectiveness of the --sparse option and how it combines with --path-walk. - t5332-multi-pack-reuse.sh : This test verifies that the preferred pack is used for delta reuse when possible. The --path-walk option is not currently aware of the preferred pack at all, so finds a different delta base. - t7406-submodule-update.sh : When using the variable, the --depth option collides with the --path-walk feature, resulting in a warning message. Disable the variable so this warning does not appear. I want to call out one specific test change that is only temporary: - t5530-upload-pack-error.sh : One test cares specifically about an "unable to read" error message. Since the current implementation performs delta calculations within the path-walk API callback, a different "unable to get size" error message appears. When this is changed in a future refactoring, this test change can be reverted. Signed-off-by: Derrick Stolee <stolee@gmail.com>
Since 'git pack-objects' supports a --path-walk option, allow passing it through in 'git repack'. This presents interesting testing opportunities for comparing the different repacking strategies against each other. Add the --path-walk option to the performance tests in p5313. For the microsoft/fluentui repo [1] checked out at a specific commit [2], the results are very interesting: Test this tree ------------------------------------------------------------------ 5313.2: thin pack 0.40(0.47+0.04) 5313.3: thin pack size 1.2M 5313.4: thin pack with --full-name-hash 0.09(0.10+0.04) 5313.5: thin pack size with --full-name-hash 22.8K 5313.6: thin pack with --path-walk 0.08(0.06+0.02) 5313.7: thin pack size with --path-walk 20.8K 5313.8: big pack 2.16(8.43+0.23) 5313.9: big pack size 17.7M 5313.10: big pack with --full-name-hash 1.42(3.06+0.21) 5313.11: big pack size with --full-name-hash 18.0M 5313.12: big pack with --path-walk 2.21(8.39+0.24) 5313.13: big pack size with --path-walk 17.8M 5313.14: repack 98.05(662.37+2.64) 5313.15: repack size 449.1K 5313.16: repack with --full-name-hash 33.95(129.44+2.63) 5313.17: repack size with --full-name-hash 182.9K 5313.18: repack with --path-walk 106.21(121.58+0.82) 5313.19: repack size with --path-walk 159.6K [1] https://github.com/microsoft/fluentui [2] e70848ebac1cd720875bccaa3026f4a9ed700e08 This repo suffers from having a lot of paths that collide in the name hash, so examining them in groups by path leads to better deltas. Also, in this case, the single-threaded implementation is competitive with the full repack. This is saving time diffing files that have significant differences from each other. A similar, but private, repo has even more extremes in the thin packs: Test this tree -------------------------------------------------------------- 5313.2: thin pack 2.39(2.91+0.10) 5313.3: thin pack size 4.5M 5313.4: thin pack with --full-name-hash 0.29(0.47+0.12) 5313.5: thin pack size with --full-name-hash 15.5K 5313.6: thin pack with --path-walk 0.35(0.31+0.04) 5313.7: thin pack size with --path-walk 14.2K Notice, however, that while the --full-name-hash version is working quite well in these cases for the thin pack, it does poorly for some other standard cases, such as this test on the Linux kernel repository: Test this tree -------------------------------------------------------------- 5313.2: thin pack 0.01(0.00+0.00) 5313.3: thin pack size 310 5313.4: thin pack with --full-name-hash 0.00(0.00+0.00) 5313.5: thin pack size with --full-name-hash 1.4K 5313.6: thin pack with --path-walk 0.00(0.00+0.00) 5313.7: thin pack size with --path-walk 310 Here, the --full-name-hash option does much worse than the default name hash, but the path-walk option does exactly as well. Signed-off-by: Derrick Stolee <stolee@gmail.com>
Users may want to enable the --path-walk option for 'git pack-objects' by default, especially underneath commands like 'git push' or 'git repack'. This should be limited to client repositories, since the --path-walk option disables bitmap walks, so would be bad to include in Git servers when serving fetches and clones. There is potential that it may be helpful to consider when repacking the repository, to take advantage of improved deltas across historical versions of the same files. Much like how "pack.useSparse" was introduced and included in "feature.experimental" before being enabled by default, use the repository settings infrastructure to make the new "pack.usePathWalk" config enabled by "feature.experimental" and "feature.manyFiles". Signed-off-by: Derrick Stolee <stolee@gmail.com>
Repositories registered with Scalar are expected to be client-only repositories that are rather large. This means that they are more likely to be good candidates for using the --path-walk option when running 'git pack-objects', especially under the hood of 'git push'. Enable this config in Scalar repositories. Signed-off-by: Derrick Stolee <stolee@gmail.com>
Previously, the --path-walk option to 'git pack-objects' would compute deltas inline with the path-walk logic. This would make the progress indicator look like it is taking a long time to enumerate objects, and then very quickly computed deltas. Instead of computing deltas on each region of objects organized by tree, store a list of regions corresponding to these groups. These can later be pulled from the list for delta compression before doing the "global" delta search. This presents a new progress indicator that can be used in tests to verify that this stage is happening. The current implementation is not integrated with threads, but could be done in a future update. Since we do not attempt to sort objects by size until after exploring all trees, we can remove the previous change to t5530 due to a different error message appearing first. Signed-off-by: Derrick Stolee <stolee@gmail.com>
A long time ago, we decided to run tests in Git for Windows' SDK with the default `winsymlinks` mode: copying instead of linking. This is still the default mode of MSYS2 to this day. However, this is not how most users run Git for Windows: As the majority of Git for Windows' users seem to be on Windows 10 and newer, likely having enabled Developer Mode (which allows creating symbolic links without administrator privileges), they will run with symlink support enabled. This is the reason why it is crucial to get the fixes for CVE-2024-? to the users, and also why it is crucial to ensure that the test suite exercises the related test cases. This commit ensures the latter. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The `__MINGW64__` constant is defined, surprise, surprise, only when building for a 64-bit CPU architecture. Therefore using it as a guard to define `_POSIX_C_SOURCE` (so that `localtime_r()` is declared, among other functions) is not enough, we also need to check `__MINGW32__`. Technically, the latter constant is defined even for 64-bit builds. But let's make things a bit easier to understand by testing for both constants. Making it so fixes this compile warning (turned error in GCC v14.1): archive-zip.c: In function 'dos_time': archive-zip.c:612:9: error: implicit declaration of function 'localtime_r'; did you mean 'localtime_s'? [-Wimplicit-function-declaration] 612 | localtime_r(&time, &tm); | ^~~~~~~~~~~ | localtime_s Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In order to be a better Windows citizenship, Git should save its configuration files on AppData folder. This can enables git configuration files be replicated between machines using the same Microsoft account logon which would reduce the friction of setting up Git on new systems. Therefore, if %APPDATA%\Git\config exists, we use it; otherwise $HOME/.config/git/config is used. Signed-off-by: Ariel Lourenco <ariellourenco@users.noreply.github.com>
Git LFS is now built with Go 1.21 which no longer supports Windows 7. However, Git for Windows still wants to support Windows 7. Ideally, Git LFS would re-introduce Windows 7 support until Git for Windows drops support for Windows 7, but that's not going to happen: git-for-windows#4996 (comment) The next best thing we can do is to let the users know what is happening, and how to get out of their fix, at least. This is not quite as easy as it would first seem because programs compiled with Go 1.21 or newer will simply throw an exception and fail with an Access Violation on Windows 7. The only way I found to address this is to replicate the logic from Go's very own `version` command (which can determine the Go version with which a given executable was built) to detect the situation, and in that case offer a helpful error message. This addresses git-for-windows#4996. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
With improvements by Clive Chan, Adric Norris, Ben Bodenmiller and Philip Oakley. Helped-by: Clive Chan <cc@clive.io> Helped-by: Adric Norris <landstander668@gmail.com> Helped-by: Ben Bodenmiller <bbodenmiller@hotmail.com> Helped-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Brendan Forster <brendan@github.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Rather than using private IFTTT Applets that send mails to this maintainer whenever a new version of a Git for Windows component was released, let's use the power of GitHub workflows to make this process publicly visible. This workflow monitors the Atom/RSS feeds, and opens a ticket whenever a new version was released. Note: Bash sometimes releases multiple patched versions within a few minutes of each other (i.e. 5.1p1 through 5.1p4, 5.0p15 and 5.0p16). The MSYS2 runtime also has a similar system. We can address those patches as a group, so we shouldn't get multiple issues about them. Note further: We're not acting on newlib releases, OpenSSL alphas, Perl release candidates or non-stable Perl releases. There's no need to open issues about them. Co-authored-by: Matthias Aßhauer <mha1993@live.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Git for Windows accepts pull requests; Core Git does not. Therefore we need to adjust the template (because it only matches core Git's project management style, not ours). Also: direct Git for Windows enhancements to their contributions page, space out the text for easy reading, and clarify that the mailing list is plain text, not HTML. Signed-off-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
See https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#enabling-dependabot-version-updates-for-actions for details. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is the recommended way on GitHub to describe policies revolving around security issues and about supported versions. Helped-by: Sven Strickroth <email@cs-ware.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
These are Git for Windows' Git GUI and gitk patches. We will have to decide at some point what to do about them, but that's a little lower priority (as Git GUI seems to be unmaintained for the time being, and the gitk maintainer keeps a very low profile on the Git mailing list, too). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This was pull request git-for-windows#1645 from ZCube/master Support windows container. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…ws#4527) With this patch, Git for Windows works as intended on mounted APFS volumes (where renaming read-only files would fail). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Specify symlink type in .gitattributes
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This patch introduces support to set special NTFS attributes that are interpreted by the Windows Subsystem for Linux as file mode bits, UID and GID. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Handle Ctrl+C in Git Bash nicely Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Switch to batched fsync by default
A fix for calling `vim` in Windows Terminal caused a regression and was reverted. We partially un-revert this, to get the fix again. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This topic branch re-adds the deprecated --stdin/-z options to `git reset`. Those patches were overridden by a different set of options in the upstream Git project before we could propose `--stdin`. We offered this in MinGit to applications that wanted a safer way to pass lots of pathspecs to Git, and these applications will need to be adjusted. Instead of `--stdin`, `--pathspec-from-file=-` should be used, and instead of `-z`, `--pathspec-file-nul`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Originally introduced as `core.useBuiltinFSMonitor` in Git for Windows and developed, improved and stabilized there, the built-in FSMonitor only made it into upstream Git (after unnecessarily long hemming and hawing and throwing overly perfectionist style review sticks into the spokes) as `core.fsmonitor = true`. In Git for Windows, with this topic branch, we re-introduce the now-obsolete config setting, with warnings suggesting to existing users how to switch to the new config setting, with the intention to ultimately drop the patch at some stage. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…updates Start monitoring updates of Git for Windows' component in the open
Add a README.md for GitHub goodness. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
/git-artifacts The The |
Validate the installer manuallyThe installer was built successfully; |
/release The |
@dscho, please Share on Bluesky and send the announcement email. |
e212079
into
git-for-windows:main
Fixes #5665
Range-diff relative to
1: 40b7a72 = 1: e73fefa sideband: mask control characters
2: 1c05864 = 2: e9c50c3 sideband: introduce an "escape hatch" to allow control characters
3: 9195c74 = 3: 8b0a078 sideband: do allow ANSI color sequences by default
4: 2d2323b = 4: 1465d4c unix-socket: avoid leak when initialization fails
5: 61fb61a = 5: 675644f grep: prevent
^$
false match at end of file6: d12b781 = 6: 2ebb94f t9350: point out that refs are not updated correctly
8: a2729e4 = 7: f84d8fa mingw: avoid relative
#include
s7: 3ec1456 = 8: 93f4318 transport-helper: add trailing --
10: c6b83a8 = 9: 7063803 mingw: order
#include
s alphabetically12: b27a1ea = 10: a834a75 mingw: include the Python parts in the build
13: 51d88a3 = 11: 7b644fa win32/pthread: avoid name clashes with winpthread
14: a8f0f51 = 12: b337455 git-compat-util: avoid redeclaring _DEFAULT_SOURCE
15: f9312d5 = 13: 21b9b93 Import the source code of mimalloc v2.2.3
237: 5a05d17 = 14: 9f7db14 mimalloc: avoid excessive memory retention
9: 101f7d5 = 15: 0f70bdb remote-helper: check helper status after import/export
18: 4b52107 = 16: 42dd6c7 mingw: demonstrate a problem with certain absolute paths
19: 66d5d62 = 17: 72dc1a5 clean: do not traverse mount points
16: b8901ec = 18: c8d01e1 mimalloc: adjust for building inside Git
11: 19fcb0e = 19: 49fd7a5 Always auto-gc after calling a fast-import transport
21: d616573 = 20: afd54e4 mingw: allow absolute paths without drive prefix
22: 10a64a1 = 21: 11467ab clean: remove mount points when possible
23: 95fac2d = 22: efca110 mingw: ensure valid CTYPE
24: 5aa094c = 23: 6e24398 mingw: demonstrate a
git add
issue with NTFS junctions25: 029c956 = 24: 2cc06a7 mingw: allow
git.exe
to be used instead of the "Git wrapper"17: 61820a2 ! 25: 84380ff mimalloc: offer a build-time option to enable it
@@ Makefile: ifdef USE_NED_ALLOCATOR +$(MIMALLOC_OBJS): COMPAT_CFLAGS += -DBANNED_H + +$(MIMALLOC_OBJS): COMPAT_CFLAGS += \ ++ -DMI_WIN_USE_FLS \ + -Wno-attributes \ + -Wno-unknown-pragmas \ + -Wno-unused-function \
26: 71a7ec3 = 26: 88b3a21 strbuf_realpath(): use platform-dependent API if available
27: 91fd222 = 27: 853be85 mingw: ignore HOMEDRIVE/HOMEPATH if it points to Windows' system directory
20: ee381de = 28: 2a0619a mingw: use mimalloc
29: a24c865 = 29: ab04fcc transport: optionally disable side-band-64k
30: cfc83db = 30: 14986ff mingw: do resolve symlinks in
getcwd()
31: 56bc53c = 31: 3ff40b1 mingw: fix fatal error working on mapped network drives on Windows
32: 5298532 = 32: 7ccce52 clink.pl: fix MSVC compile script to handle libcurl-d.lib
33: 4b8a81c = 33: 3677584 mingw: implement a platform-specific
strbuf_realpath()
28: b7b3179 ! 34: 8a624d1 http: use new "best effort" strategy for Secure Channel revoke checking
34: eaefde7 = 35: e3c52b6 t5505/t5516: allow running without
.git/branches/
in the templates35: bc01ae4 = 36: 4ce4d73 t5505/t5516: fix white-space around redirectors
36: d924bbe = 37: ecd89df clink.pl: fix libexpatd.lib link error when using MSVC
37: 711ee30 = 38: 580bf73 t3701: verify that we can add lots of files interactively
38: 263ccb8 = 39: 70600cc git add -i: handle CR/LF line endings in the interactive input
39: ca205fb = 40: 3c8ffbf commit: accept "scissors" with CR/LF line endings
40: 6c953f9 = 41: 0fb397b t0014: fix indentation
41: f04756b = 42: 1ed143a git-gui: accommodate for intent-to-add files
42: 217831e = 43: 372ccc7 vcpkg_install: detect lack of Git
43: e501b8a = 44: 459ec1e vcpkg_install: add comment regarding slow network connections
44: e5fd024 = 45: 817fe8f vcbuild: install ARM64 dependencies when building ARM64 binaries
45: da8685e = 46: 3e0bf9b Makefile: clean up .ilk files when MSVC=1
46: 0057836 = 47: 5acde99 vcbuild: add an option to install individual 'features'
47: 645fa10 = 48: 5967d40 vcbuild: add support for compiling Windows resource files
48: c8b88ea = 49: 06e6a98 cmake: allow building for Windows/ARM64
49: 0326293 = 50: b57cf14 config.mak.uname: add git.rc to MSVC builds
50: 4308805 = 51: 4f49d9e ci(vs-build) also build Windows/ARM64 artifacts
51: 5b31441 = 52: 07a0143 clink.pl: ignore no-stack-protector arg on MSVC=1 builds
52: d494aae = 53: acdbf8d Add schannel to curl installation
53: 5b30759 = 54: ceda56d clink.pl: move default linker options for MSVC=1 builds
54: b4c1325 = 55: 74c1ba8 cmake(): allow setting HOST_CPU for cross-compilation
55: 99b4411 = 56: 68f7e59 cmake: install headless-git.
57: cd7668b = 57: babfd65 CMake: default Visual Studio generator has changed
56: 25aeac6 = 58: 127ef69 hash-object: demonstrate a >4GB/LLP64 problem
59: 8a37e9d = 59: c65a9ec .gitignore: add Visual Studio CMakeSetting.json file
58: 95c930b = 60: 3e12b5d object-file.c: use size_t for header lengths
61: 71cf6ca = 61: 9aa8737 subtree: update
contrib/subtree
test
target62: ccd65d4 = 62: d49d8a0 CMakeLists: add default "x64-windows" arch for Visual Studio
60: 1e9db04 = 63: 8475931 hash algorithms: use size_t for section lengths
64: 26b3de1 = 64: c8333df mingw: allow for longer paths in
parse_interpreter()
65: 0afb4b4 = 65: 0dba464 compat/vcbuild: document preferred way to build in Visual Studio
66: e1a8987 ! 66: 9b58f03 http: optionally send SSL client certificate
67: f60c057 = 67: d2b4c19 ci: run
contrib/subtree
tests in CI builds68: 432355d = 68: bee2496 CMake: show Win32 and Generator_platform build-option values
69: 1149d53 = 69: 514b162 init: do parse all core.* settings early
63: c239ba0 = 70: 6b71feb hash-object --stdin: verify that it works with >4GB/LLP64
70: ef900aa = 71: 937caaf hash-object: add another >4GB/LLP64 test case
71: c4e71bb = 72: 3a4578c setup: properly use "%(prefix)/" when in WSL
72: 8eaef44 = 73: dea0430 Add config option
windows.appendAtomically
73: 8d12eab = 74: 531aa17 MinGW: link as terminal server aware
74: 1d022ea = 75: e77d7a1 hash-object: add a >4GB/LLP64 test case using filtered input
75: 39d87a8 = 76: 3c103b5 compat/mingw.c: do not warn when failing to get owner
76: bd31250 = 77: 0a76eca mingw: $env:TERM="xterm-256color" for newer OSes
77: 84ae8e9 = 78: 70ee9bf winansi: check result and Buffer before using Name
78: facac87 = 79: 0285dde mingw: change core.fsyncObjectFiles = 1 by default
79: a73fa66 = 80: 9e7ccf8 Fix Windows version resources
80: b40b1d8 = 81: 1dddbdb status: fix for old-style submodules with commondir
81: ec0cd76 = 82: 5338ae8 http: optionally load libcurl lazily
82: 0653184 = 83: 425d33f http: support lazy-loading libcurl also on Windows
83: 9c7b2e0 = 84: b6b2717 http: when loading libcurl lazily, allow for multiple SSL backends
84: e69b8b5 = 85: b08bb43 windows: skip linking
git-<command>
for built-ins85: dbe6980 = 86: ba97430 windows: fix Repository>Explore Working Copy
86: cbb91fb = 87: 073762f mingw: do load libcurl dynamically by default
87: ce991ce = 88: 85e3ebd Add a GitHub workflow to verify that Git/Scalar work in Nano Server
88: 212e946 = 89: a2df6ee mingw: suggest
windows.appendAtomically
in more cases89: 8bc6dbe = 90: 3bb9c2f win32: use native ANSI sequence processing, if possible
90: 722c1b6 = 91: a693ad9 git.rc: include winuser.h
91: f58a926 = 92: bc719e2 common-main.c: fflush stdout buffer upon exit
94: 0cc4fd0 = 93: d4f69b1 ci: work around a problem with HTTP/2 vs libcurl v8.10.0
95: 578840a = 94: f209010 revision: create mark_trees_uninteresting_dense()
96: a01a7d1 = 95: 2faba74 pack-objects: extract should_attempt_deltas()
97: 26d98e9 = 96: b12b436 pack-objects: add --path-walk option
98: 3246aa9 = 97: 2c32add pack-objects: introduce GIT_TEST_PACK_PATH_WALK
99: 845797f = 98: 125101f repack: add --path-walk option
100: 15f290b = 99: 9cd9f31 pack-objects: enable --path-walk via config
103: cee2d14 = 100: 29024ed scalar: enable path-walk during push via config
104: ad567f3 = 101: 0c24151 pack-objects: refactor path-walk delta phase
92: a0cf8bc = 102: 10ffda2 t5601/t7406(mingw): do run tests with symlink support
93: 2039c57 = 103: f97ec05 win32: ensure that
localtime_r()
is declared even in i686 builds101: 1904c8b = 104: 39dbd7d Fallback to AppData if XDG_CONFIG_HOME is unset
102: 097e770 = 105: 75896e1 run-command: be helpful with Git LFS fails on Windows 7
105: 9c3f548 = 106: bb27ee4 pack-objects: thread the path-based compression
106: 46662ea = 107: a7fec1b survey: stub in new experimental 'git-survey' command
107: 2b4ad11 = 108: 2f7e431 survey: add command line opts to select references
108: bf0b2c3 = 109: d790833 survey: start pretty printing data in table form
109: 1749e4d = 110: 1422871 survey: add object count summary
110: 2773ccb = 111: 3564cae survey: summarize total sizes by object type
111: 60fdd4b = 112: 9124e8f survey: show progress during object walk
113: a3509d2 = 113: d27d17c survey: add ability to track prioritized lists
115: ddf29d2 = 114: 5185b1c survey: add report of "largest" paths
117: 0c7d1c5 = 115: 66c44c5 survey: add --top= option and config
112: acadf50 = 116: a9fac0d mingw: make sure
errno
is set correctly when socket operations fail119: 9e3ee33 = 117: a306d2b survey: clearly note the experimental nature in the output
114: 0bea82c = 118: 0a19fc6 compat/mingw: handle WSA errors in strerror
116: 7d4fe9b = 119: 5ec808b compat/mingw: drop outdated comment
120: d333b01 = 120: e5585c4 mingw_open_existing: handle directories better
118: 4c96ef2 = 121: 57d707b t0301: actually test credential-cache on Windows
121: 05b64cb = 122: 9db3a65 mingw: drop Windows 7-specific work-around
122: 465a3ea = 123: 45289af credential-cache: handle ECONNREFUSED gracefully
123: d0265b7 = 124: 22f42a0 mingw_rename: support ReFS on Windows 2022
124: a0e654f = 125: ba750ef max_tree_depth: lower it for clangarm64 on Windows
125: c8b30f3 = 126: 0b382eb reftable: do make sure to use custom allocators
126: 3ddd87a = 127: 29b1daf check-whitespace: avoid alerts about upstream commits
238: 2b65033 = 128: 72b5a89 refs: forbid clang to complain about unreachable code
240: fb89f37 = 129: 762bcee mingw: avoid the comma operator
127: 26cce2d = 130: 19e3c64 git-gui: provide question helper for retry fallback on Windows
128: 1914172 = 131: df96210 git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
129: 4e5c950 = 132: 48767d4 git-gui--askyesno: fix funny text wrapping
130: 2d032e5 = 133: 2148e97 git-gui--askyesno: allow overriding the window title
131: 136a522 = 134: a7682a9 git-gui--askyesno (mingw): use Git for Windows' icon, if available
132: a9dcdcc = 135: 5f44a60 Win32: make FILETIME conversion functions public
133: 7d8b781 = 136: 4e349eb Win32: dirent.c: Move opendir down
134: b3b1a69 = 137: 9451c6b mingw: make the dirent implementation pluggable
135: 2ede2e9 = 138: d1f5e7c Win32: make the lstat implementation pluggable
136: 7385ae3 = 139: 63df1b2 mingw: add infrastructure for read-only file system level caches
137: adf7094 = 140: 1238254 mingw: add a cache below mingw's lstat and dirent implementations
138: 272745b = 141: 4319937 fscache: load directories only once
139: 649d0cd = 142: 666f0f3 fscache: add key for GIT_TRACE_FSCACHE
140: 31e5a52 = 143: 25891d5 fscache: remember not-found directories
141: 5e3be13 = 144: 8b5acc4 fscache: add a test for the dir-not-found optimization
142: c239a34 = 145: 21ad54f add: use preload-index and fscache for performance
143: 38741f8 = 146: 1b7d89a dir.c: make add_excludes aware of fscache during status
144: cb660ed = 147: 382c1ca fscache: make fscache_enabled() public
145: a7347b4 = 148: b620199 dir.c: regression fix for add_excludes with fscache
146: eea15ef = 149: 20c069d fetch-pack.c: enable fscache for stats under .git/objects
147: 60d2112 = 150: bbc8a77 checkout.c: enable fscache for checkout again
148: 3fd471e = 151: 683541b Enable the filesystem cache (fscache) in refresh_index().
149: 8d391ba = 152: 96870d1 fscache: use FindFirstFileExW to avoid retrieving the short name
150: 079e4e1 = 153: 0404729 fscache: add GIT_TEST_FSCACHE support
151: d2fcf71 = 154: 8202d91 fscache: add fscache hit statistics
152: 312522d = 155: 485f368 unpack-trees: enable fscache for sparse-checkout
153: 8ec3253 = 156: ce0f7bf status: disable and free fscache at the end of the status command
154: 16813eb = 157: 01f8fe8 mem_pool: add GIT_TRACE_MEMPOOL support
155: 2bdad05 = 158: 893eb52 fscache: fscache takes an initial size
156: d24a7b5 = 159: c4b7a7c fscache: update fscache to be thread specific instead of global
157: 8e86a5c = 160: d825c1a fscache: teach fscache to use mempool
158: 6ad5a4f = 161: 6e602fe fscache: make fscache_enable() thread safe
159: 1e58253 = 162: 72f7d84 fscache: teach fscache to use NtQueryDirectoryFile
160: 7b6849d = 163: 4c37726 fscache: remember the reparse tag for each entry
161: 9a9d0dc = 164: 51af6d4 fscache: implement an FSCache-aware is_mount_point()
162: f6f65dc = 165: 0204799 clean: make use of FSCache
163: 41e7b4b = 166: fd9254d pack-objects (mingw): demonstrate a segmentation fault with large deltas
164: 0b015d9 = 167: b54ee6b mingw: support long paths
165: 7b6deb6 = 168: dfa2022 Win32: fix 'lstat("dir/")' with long paths
166: a63e512 = 169: 7e5a28e win32(long path support): leave drive-less absolute paths intact
167: ba6c04a = 170: 9f20584 compat/fsmonitor/fsm-*-win32: support long paths
168: 4780290 = 171: 34661cd clean: suggest using
core.longPaths
if paths are too long to remove169: a6f8a39 = 172: d203d8c mingw: Support
git_terminal_prompt
with more terminals170: 0b4d8e2 = 173: a961e06 compat/terminal.c: only use the Windows console if bash 'read -r' fails
171: 1cd55e4 = 174: 611e27b mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
172: 48c84a0 = 175: 490a3c0 strbuf_readlink: don't call readlink twice if hint is the exact link size
173: 2df2e82 = 176: e967942 strbuf_readlink: support link targets that exceed PATH_MAX
174: 9f7e78e = 177: be48cae lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
175: c86d667 = 178: 6ad1837 Win32: don't call GetFileAttributes twice in mingw_lstat()
176: e721421 = 179: de29ee1 Win32: implement stat() with symlink support
177: 0b7ee0c = 180: cc5ef05 Win32: remove separate do_lstat() function
178: 04fde20 = 181: 540229a Win32: let mingw_lstat() error early upon problems with reparse points
179: 4c7e6a1 = 182: 3bf8f92 mingw: teach fscache and dirent about symlinks
180: 363ab11 = 183: f7b9be1 Win32: lstat(): return adequate stat.st_size for symlinks
181: 190451b = 184: eb33fd1 Win32: factor out retry logic
182: e7b6ee4 = 185: f15b288 Win32: change default of 'core.symlinks' to false
183: 249347d = 186: 4678cb6 Win32: add symlink-specific error codes
184: ec7a8a7 = 187: 6a9f110 Win32: mingw_unlink: support symlinks to directories
185: c318843 = 188: c919d0b Win32: mingw_rename: support renaming symlinks
186: f88a3d2 = 189: 8d25ba2 Win32: mingw_chdir: change to symlink-resolved directory
187: ba00e4a = 190: f1f225b Win32: implement readlink()
188: 657af5f = 191: 8d940a1 mingw: lstat: compute correct size for symlinks
189: 55227de = 192: a035c84 Win32: implement basic symlink() functionality (file symlinks only)
190: a4d3841 = 193: b7f3164 Win32: symlink: add support for symlinks to directories
191: 6fc690d = 194: 45cebe1 mingw: try to create symlinks without elevated permissions
192: 7940803 = 195: 97fe22b mingw: emulate stat() a little more faithfully
193: bb36858 = 196: b7d8caa mingw: special-case index entries for symlinks with buggy size
196: 6c51221 = 197: 6b7296f mingw: introduce code to detect whether we're inside a Windows container
198: 4c574ee = 198: c90f93d mingw: when running in a Windows container, try to rename() harder
200: 736e406 = 199: 7ea1188 mingw: move the file_attr_to_st_mode() function definition
202: 8495182 = 200: fd2ae2c mingw: Windows Docker volumes are not symbolic links
204: ef31bcf = 201: 81b39a9 mingw: work around rename() failing on a read-only file
194: 882331d = 202: 7e61faa Win32: symlink: move phantom symlink creation to a separate function
195: 2ac053a = 203: fe449d1 Introduce helper to create symlinks that knows about index_state
197: 21874db = 204: 2504a7b mingw: allow to specify the symlink type in .gitattributes
199: 3806230 = 205: 9c0c942 Win32: symlink: add test for
symlink
attribute201: 9ccfb07 = 206: 00cc6bf mingw: explicitly specify with which cmd to prefix the cmdline
203: 3713e1b = 207: 06fe0fc mingw: when path_lookup() failed, try BusyBox
205: 3e4400f = 208: 46b327f test-tool: learn to act as a drop-in replacement for
iconv
206: f99dbcd = 209: 00a06ac tests(mingw): if
iconv
is unavailable, usetest-helper --iconv
207: 1824307 = 210: 59ddc6d gitattributes: mark .png files as binary
208: 777c8cf = 211: 27eed80 tests: move test PNGs into t/lib-diff/
209: 4def7f7 = 212: 80d8f9b tests: only override sort & find if there are usable ones in /usr/bin/
210: 86c5c54 = 213: bc4b1e0 tests: use the correct path separator with BusyBox
211: 84c709a = 214: 7d460bb mingw: only use Bash-ism
builtin pwd -W
when available212: 8cd24d3 = 215: 379aa45 tests (mingw): remove Bash-specific pwd option
213: 3dad2f7 = 216: 5131e04 test-lib: add BUSYBOX prerequisite
214: 6428689 = 217: 883ff88 t5003: use binary file from t/lib-diff/
215: fc4af1f = 218: 09937eb t5532: workaround for BusyBox on Windows
216: 56ae74b = 219: ec99e21 t5605: special-case hardlink test for BusyBox-w32
217: 4ae69ab = 220: 60c0543 t5813: allow for $PWD to be a Windows path
218: 3afe2df = 221: d2a3f42 t9200: skip tests when $PWD contains a colon
219: 4658c1e = 222: ac524b4 mingw: add a Makefile target to copy test artifacts
222: 5961162 = 223: 67f90f9 mingw: optionally enable wsl compability file mode bits
220: 088ff47 = 224: aa525ff mingw: kill child processes in a gentler way
223: 6b4057b = 225: b408621 mingw: really handle SIGINT
221: 33e922d = 226: 7993c46 mingw: do not call xutftowcs_path in mingw_mktemp
224: aa0f3f9 = 227: 608f35a Partially un-revert "editor: save and reset terminal after calling EDITOR"
232: da2498e = 228: e725789 reset: reinstate support for the deprecated --stdin option
233: af976c0 = 229: 60ad39e fsmonitor: reintroduce core.useBuiltinFSMonitor
225: 3b85add = 230: 51ca0d6 Describe Git for Windows' architecture [no ci]
226: d85de55 = 231: 769584b Modify the Code of Conduct for Git for Windows
227: f34f3e8 = 232: 203922b CONTRIBUTING.md: add guide for first-time contributors
228: 9aee88f = 233: 6cdd223 README.md: Add a Windows-specific preamble
229: 25145bd = 234: 88bffa8 Add an issue template
230: 2aa8aca = 235: 857fc12 Add a GitHub workflow to monitor component updates
231: 32d639c = 236: f0b2870 Modify the GitHub Pull Request template (to reflect Git for Windows)
234: 6bf56e7 = 237: 82feb60 dependabot: help keeping GitHub Actions versions up to date
235: 852fedb = 238: 9e4931f SECURITY.md: document Git for Windows' policies
236: fca69d2 < -: ------------ fixup! mimalloc: offer a build-time option to enable it
239: 6792aa8 < -: ------------ curl: pass
long
values where expectedThis fix was done differently in upstream (using an upper-case
L
to indicatelong
constants instead of a lower-casel
).